 @extends('layout.admin')
 @section('content')

        <!-- 内容区域 -->
        <div class="tpl-content-wrapper">
            <div class="row-content am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">
                            <div class="widget-head am-cf">
                                <div class="widget-title  am-cf">商品列表</div>


                            </div>
                            <div class="widget-body  am-fr">

                       
                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                                    <div class="am-form-group tpl-table-list-select">
             
                                    </div>
                                </div>
                          

                                <div class="am-u-sm-12">
                                    <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                                        <thead>
                                            <tr>
                                                <th>订单号</th>
                                                <th>商品名</th>
                                                <th>地址</th>
                                                <th>价钱</th>
                                                <th>状态</th>
                                              
                                            </tr>
                                        </thead>
                                        <tbody>
                                        @foreach($data as $good)
                                            <tr class="gradeX">
                                                
                                                <td class="am-text-middle">{{$good->dnh}}</td>
                                                 <td class="am-text-middle">{{$good->good}}</td>
                                                 <td class="am-text-middle">{{$good->address}}</td>
                                                <td class="am-text-middle">{{$good->money}}</td>
                                                <td class="am-text-middle">新订单</td>
                                            >
                                            </tr>
                                            @endforeach
                                         
                                            <!-- more data -->
                                        </tbody>
                                    </table>
                                </div>
                                <div class="am-u-lg-12 am-cf">

                                    <div class="am-fr saa">
                                
                                       
                                       {!! $data->render() !!}
                                           
                                       
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>
    <script>
            $('ul li').css({float:'left'});

            $(".select").change(function() {
                var op = $(this).val();
                $.ajaxSetup({
                        headers: { 'X-CSRF-TOKEN' : '{{ csrf_token() }}' }
                    });
               $.post('/shoplei/'+op,{name:op},
                function(data){

                    $("tbody").empty();
                    $.each(data['1'],function(tt,n){
                   
                        $("tbody").append(
                            '<tr class="gradeX"><td><img src="/'+data['1'][tt]['photo']+'" class="tpl-table-line-img" alt=""></td><td class="am-text-middle">'+data['1'][tt]['name']+'</td><td class="am-text-middle">'+data['1'][tt]['intro']+'</td><td class="am-text-middle">'+data['1'][tt]['money']+'</td><td class="am-text-middle">'+data['1'][tt]['sales']+'</td><td class="am-text-middle"><div class="tpl-table-black-operation"><a href="/shopupdata/'+data['1'][tt]['id']+'"><i class="am-icon-pencil"></i> 编辑</a><a href="/shopdelete/'+data['1'][tt]['id']+'" class="tpl-table-black-operation-del"><i class="am-icon-trash"></i> 删除</a></div></td></tr>'
                            );
                    });
                    $(".saa").empty();
                    $(".saa").append(data['2']);
                      
                });

            });

         



    </script>
@endsection